#ifndef LIGHTSOURCE_H
#define LIGHTSOURCE_H

#include "point.h"
#include "vector.h"
#include "types.h"
#include "cgmaterial.h"
#include "camera.h"

typedef CgMaterial LightIntensity;

class ILightSource
{
public:
    ILightSource();

    void set_ambient(const CgColor &ambient);
    void set_diffuse(const CgColor &diffuse);
    void set_specular(const CgColor &specular);
    CgColor ambient() const;
    CgColor diffuse() const;
    CgColor specular() const;
    virtual void applyCameraTransformation(const Camera &camera) = 0;
    virtual void glSetup(int light_id) const = 0;
    virtual LightIntensity intensity(const Point &p) const = 0;
    virtual Vector direction(const Point &p) const = 0;
    virtual ILightSource* clone() const = 0;

protected:
    LightIntensity intensities_;
};

#endif // LIGHTSOURCE_H
